//
//  main.m
//  lesson_01
//
//  Created by dllo on 16/3/16.
//  Copyright © 2016年 NetEase. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Car.h"
#import "Teacher.h"
#import "Student.h"
int main(int argc, const char * argv[]) {
    //实例化一个Car类的对象:
   // Car *car = [Car alloc];//开辟空间,调用父类方法
    //初始化新的空间:
    //car =[car init];
    //访问实例变量:
    //NSLog(@"%@", car->_brand);//%@负责打印对象类型,本质就是指针类型                  (字符串%@)
    
//    Car *c1 = [[Car alloc]init];
//    c1->_brand = @"奥迪双钻";
//    c1->_color = @"红色";
//    c1->_lenght = 2.06;
//    c1->_speed = 180;
//    c1->_haveUpWindow = YES;
//    NSLog(@"%@", c1->_brand);
//    NSLog(@"%@", c1->_color);
   // NSLog(@"%.2f",c1->_lenght);
    
    //调用对象的方法:[]括号是消息发送的机制的标志
    //[c1 speedDown];
    //[c1 speedUp];
    
          //练习题1:
    
//    Teacher *t1 = [[Teacher alloc] init];
   // t1->_name = @"周琦";
    
//    [t1 setName :@"戴维斯"];
//    NSLog(@"%@", [t1 getName]);
//    Teacher *t2 =[[Teacher alloc] init];
//    [t2 setName:@"利拉德"];
//    NSLog(@"%@", [t2 getName]);
    

    Student *stu =[[Student alloc]init];
    [stu setStudentInfoWithName:@"张三" Gender:@"男" Age:15 Height:175.4];
    
    return 0;
}
